package com.example.demo.domain;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface UserRepository extends JpaRepository<User,Long> {
    @Query(value = "select name,id from user",nativeQuery = true)
    public List<Map<String,String>> getUserName();
}
